#!/bin/bash
TCL=${TCL_TCLSH}

# check arguments
if [ -z "$1" -o ! -e "$1" ]; then
  echo "error: argument #1 expected or $1 not found"
  exit 1
fi
export LIBSIMULAVR=$1
if [ -z "$2" -o ! -e "$2" ]; then
  echo "error: argument #2 expected or $2 not found"
  exit 1
fi
SCRIPT=$2

# run test
$TCL $SCRIPT
if [ "$?" == "4" ]; then
  exit 0
else
  exit 1
fi

# EOF